import request from "@/libs/axios.js";
import Qs from "qs";

// 登入
export function Login(data) {
  return request({
    url: "/api/admin/account/login",
    method: "post",
    data: data,
  });
}
// 登出
export function Logout() {
  return request({
    url: "/api/admin/account/logout",
    method: "post",
  });
}
// 密码修改
export function setPassWord(data) {
  return request({
    url: "/api/admin/account/setPassWord",
    method: "put",
    data: data,
  });
}

//OA系统
//日报管理
//日报列表
export function getUserTaskList(data) {
  return request({
    url: "/api/admin/daily/getUserTaskList",
    method: "post",
    data: data,
  });
}

//周报-年报查看

//根据年份查询周报时间段下拉列表
export function yearPeriodList(year) {
  return request({
    url: `/api/admin/weekly/yearPeriodList/${year}`,
    method: "get",
  });
}
// 周报时间段
export function periodWeekList() {
  return request({
    url: "/api/admin/weekly/periodWeekList",
    method: "get",
  });
}
// 周报列表
export function weekReportList(data) {
  return request({
    url: "/api/admin/weekly/weekReportList",
    method: "post",
    data: data,
  });
}
//异常周报列表
export function weeklyAnomalyList(data) {
  return request({
    url: "/api/admin/weekly/weeklyUnusualList",
    method: "post",
    data: data
  });
}
// 年报列表
export function yearReportList(data) {
  return request({
    url: `/api/admin/weekly/yearReportList/${data.year}`,
    method: "get",
  });
}
// 个人年报列表
export function userAnnWorkHours(data) {
  return request({
    url: `/api/admin/weekly/userAnnWorkHours/${data.year}/${data.id}`,
    method: "get",
  });
}
// 个人年报项目详情
export function userProjectDailyList(data) {
  return request({
    url: `/api/admin/weekly/userProjectDailyList/${data.pid}/${data.uid}`,
    method: "get",
  });
}
// 个人周报查看
export function userWeeklyList(data) {
  return request({
    url: "/api/admin/weekly/userWeeklyList",
    method: "post",
    data: data,
  });
}
//处理异常周报
export function handleAnomalyList(data) {
  return request({
    url: "/api/admin/weekly/dealBatchUnusual",
    method: "put",
    data: data,
  });
}
//获取时间段列表[计划和总结调用]
export function companyPlan(type) {
  return request({
    url: `/api/admin/companyPlan/weekPart/${type}`,
    method: "get",
    //data:data,
  });
}
//分页查询公司周计划列表
export function companyPlanList(data) {
  return request({
    url: `/api/admin/companyPlan/list`,
    method: "post",
    data: data,
  });
}
//查询公司周计划项目
export function getCompanyProject() {
  return request({
    url: `/api/admin/companyPlan/projectList`,
    method: "get",
  });
}
//保存公司周计划
export function addCompanyPlan(data) {
  return request({
    url: `/api/admin/companyPlan/save`,
    method: "post",
    data: data,
  });
}
//修改公司周计划
export function updateCompanyPlan(data, type) {
  return request({
    url: `/api/admin/companyPlan/update/${type}`,
    method: "put",
    data: data,
  });
}
//删除公司周计划
export function deleteCompanyPlan(id) {
  return request({
    url: `/api/admin/companyPlan/delete/${id}`,
    method: "delete",
    //data:data,
  });
}
//是否大屏显示
export function showState(data) {
  return request({
    url: `/api/admin/companyPlan/showState`,
    method: "post",
    data: data,
  });
}
//根据条件查询公司周计划
export function getCompanyPlanById(data) {
  return request({
    url: `/api/admin/companyPlan/info`,
    method: "post",
    data: data,
  });
}

//查询日计划或周计划下拉列表
export function getPlanByType(data, type) {
  return request({
    url: `/api/admin/daily/getUserPlan/${type}`,
    method: "post",
    data: data,
  });
}

//保存员工周计划
export function addEmpPlan(data) {
  return request({
    url: `/api/admin/empPlan/save`,
    method: "post",
    data: data,
  });
}
//分页查询员工周计划列表
export function empPlanList(data) {
  return request({
    url: `/api/admin/empPlan/list`,
    method: "post",
    data: data,
  });
}
//确认员工计划
export function empPlanReview(data) {
  return request({
    url: `/api/admin/empPlan/review`,
    method: "post",
    data: data,
  });
}
//修改员工计划
export function empPlanUpdate(data) {
  return request({
    url: `/api/admin/empPlan/update`,
    method: "put",
    data: data,
  });
}
//删除员工计划
export function empPlanDelete(id) {
  return request({
    url: `/api/admin/empPlan/delete/${id}`,
    method: "delete",
    //data:data,
  });
}
//新增员工计划和总结
export function savePlanAndSummary(data) {
  return request({
    url: `/api/admin/empSummary/savePlanAndSummary`,
    method: "post",
    data: data,
  });
}
//员工总结信息列表
export function empSummaryList(data) {
  return request({
    url: `/api/admin/empSummary/list`,
    method: "post",
    data: data,
  });
}
//确认员工总结
export function empSummaryReview(data) {
  return request({
    url: `/api/admin/empSummary/review`,
    method: "post",
    data: data,
  });
}
//员工工作计划上新增员工总结
export function empPlanAddSummary(data) {
  return request({
    url: `/api/admin/empSummary/save`,
    method: "post",
    data: data,
  });
}
//修改员工总结
export function updateEmpSummary(data) {
  return request({
    url: `/api/admin/empSummary/update`,
    method: "put",
    data: data,
  });
}
//删除员工总结和计划
export function deleteEmpSummary(id) {
  return request({
    url: `/api/admin/empSummary/delete/${id}`,
    method: "delete",
    //data:data,
  });
}
//员工职能组分组周计划列表
export function empPlanPersonal(data) {
  return request({
    url: `/api/admin/empPlan/list`,
    method: "post",
    data: data,
  });
}

//员工未审核周计划列表
export function empToBeConfirmed(data) {
  return request({
    url: `/api/admin/empPlan/toBeConfirmed`,
    method: "post",
    data: data,
  });
}

//员工个人历史周计划列表
export function personPlanList(data) {
  return request({
    url: `/api/admin/empPlan/personPlanList`,
    method: "post",
    data: data,
  });
}

//员工职能组分组周总结列表
export function empSummaryPersonal(data) {
  return request({
    url: `/api/admin/empSummary/list`,
    method: "post",
    data: data,
  });
}

//员工未审核总结列表
export function empSummaryToBeConfirmed(data) {
  return request({
    url: `/api/admin/empSummary/toBeConfirmed`,
    method: "post",
    data: data,
  });
}

//员工个人历史周总结列表
export function personSummaryList(data) {
  return request({
    url: `/api/admin/empSummary/personSummaryList`,
    method: "post",
    data: data,
  });
}


// 项目管理
// 项目列表
export function selectProjectListByReq(data) {
  return request({
    url: "/api/admin/project/selectProjectListByReq",
    method: "post",
    data: data,
  });
}
// 项目新增
export function insertProject(data) {
  return request({
    url: "/api/admin/project/insertProject",
    method: "post",
    data: data,
  });
}
// 项目编辑
export function updateProject(data) {
  return request({
    url: "/api/admin/project/updateProject",
    method: "put",
    data: data,
  });
}
// 项目重启
export function restartProeject(data) {
  return request({
    url: `/api/admin/project/restartProeject/${data.projectId}/${data.status}`,
    method: "put",
  });
}
// 项目经理下拉列表
export function selectAllUser() {
  return request({
    url: "/api/admin/project/selectAllUser",
    method: "get",
  });
}
// 项目详情
export function selectProjectById(projectid) {
  return request({
    url: `/api/admin/project/selectProjectById/${projectid}`,
    method: "get",
  });
}
// 项目关闭
export function closeProject(data) {
  return request({
    url: `/api/admin/project/closeProject`,
    method: "post",
    data: data,
  });
}
// 记录列表
export function selectProjectRecord(data) {
  return request({
    url: "/api/admin/project/selectProjectRecord",
    method: "post",
    data: data,
  });
}
// 记录添加
export function insertProjectRecord(data) {
  return request({
    url: "/api/admin/project/insertProjectRecord",
    method: "post",
    data: data,
  });
}
// 记录删除
export function deleteProjectRecord(recordId) {
  return request({
    url: `/api/admin/project/deleteProjectRecord/${recordId}`,
    method: "delete",
  });
}

// 项目成员管理
// 项目成员列表
export function projectUser(data) {
  return request({
    url: `/api/admin/project/projectUser/${data.projectid}`,
    method: "get",
  });
}
// 添加项目成员
export function insertPrjUser(data, pid) {
  return request({
    url: `/api/admin/project/insertPrjUser/${pid}`,
    method: "post",
    data: data,
  });
}
// 移除项目成员
export function deletePrjUser(data) {
  return request({
    url: `/api/admin/project/deletePrjUser`,
    method: "post",
    data: data,
  });
}
//工时列表
export function workingHoursList(data) {
  return request({
    url: "/api/admin/project/workingHoursList",
    method: "post",
    data: data,
  });
}
// 板块列表
export function selectProjectPlate() {
  return request({
    url: "/api/admin/systemset/selectProjectPlate",
    method: "get",
  });
}
// 板块添加
export function insertProjectPlate(data) {
  return request({
    url: "/api/admin/systemset/insertProjectPlate",
    method: "post",
    data: data,
  });
}
// 板块排序设置
export function setSortProjectPlate(plateId, sort) {
  return request({
    url: `/api/admin/systemset/setSortProjectPlate/${plateId}/${sort}`,
    method: "put",
  });
}
// 板块删除
export function deleteProjectPlate(id) {
  return request({
    url: `/api/admin/systemset/deleteProjectPlate/${id}`,
    method: "delete",
  });
}

//公司管理
//岗位列表
export function selectSysPostList() {
  return request({
    url: "/api/admin/company/selectSysPostList",
    method: "get",
  });
}
//岗位添加
export function insertSysPost(data) {
  return request({
    url: "/api/admin/company/insertSysPost",
    method: "post",
    data: data,
  });
}
//岗位修改
export function updateSysPost(data) {
  return request({
    url: "/api/admin/company/updateSysPost",
    method: "put",
    data: data,
  });
}
//岗位删除
export function deletePost(sid) {
  return request({
    url: `/api/admin/company/deletePost/${sid}`,
    method: "delete",
  });
}
//员工通讯录列表
export function selectUserList(data) {
  return request({
    url: "/api/admin/company/selectUserList",
    method: "post",
    data: data,
  });
}
//职能组列表
export function selectFunGroupList() {
  return request({
    url: "/api/admin/company/selectFunctionGroupList",
    method: "get",
  });
}
//职能组列表
export function selectFunctionGroupList(userId) {
  return request({
    url: `/api/admin/company/selDeptFunGroupList/${userId}`,
    method: "get",
  });
}
//职能组列表添加
export function insertFunctionGroup(data) {
  return request({
    url: "/api/admin/company/insertFunctionGroup",
    method: "post",
    data: data,
  });
}
//职能组修改
export function updateFunctionGroup(data) {
  return request({
    url: "/api/admin/company/updateFunctionGroup",
    method: "put",
    data: data,
  });
}

//修改总经办可查看职能组的id
export function updateBossGroup(data) {
  return request({
    url: "api/admin/company/updateBossGroup",
    method: "put",
    data: data,
  });
}

//职能组删除
export function deleteFunctionGroup(fid) {
  return request({
    url: `/api/admin/company/deleteFunctionGroup/${fid}`,
    method: "delete",
  });
}
//职能组属性列表
export function selectAllFunctionAttr() {
  return request({
    url: `/api/admin/company/selectAllFunctionAttr`,
    method: "get",
  });
}
//下属职能组列表
export function selectFunctionGroupLists(userId) {
  return request({
    url: `/api/admin/taskinfo/selDeptFunGroupList/${userId}`,
    method: "get",
  });
}
//职能组属性(选中)列表
export function selectGroupAttr(id) {
  return request({
    url: `/api/admin/company/selectGroupAttr/${id}`,
    method: "get",
  });
}
//职能组属性设置
export function insertFunctionAttr(id, data) {
  return request({
    url: `/api/admin/company/insertFunctionAttr/${id}`,
    method: "post",
    data: data,
  });
}

//导出
export function exportEmpInfo(data) {
  return request({
    url: "/api/admin/company/exportEmpInfo",
    method: "get",
    responseType: "blob",
    data: data,
  });
}

//袁最
//文档管理
//公司规章制度列表
export function documentList(data) {
  return request({
    url: "/api/admin/document/documentList",
    method: "post",
    data: data,
  });
}
//开发文档规范列表
export function documentsevenList(data) {
  return request({
    url: "/api/admin/document/documentList/7",
    method: "post",
    data: data,
  });
}
//项目管理文档列表
export function documenteightList(data) {
  return request({
    url: "/api/admin/document/documentList/8",
    method: "post",
    data: data,
  });
}
//文档下载
export function downloadFile(data) {
  return request({
    url: `/api/download/downloadFile/${data.type}?filePath=${data.filePath}&fileName=${data.fileName}`,
    method: "get",
  });
}
//其他文档列表
export function documentfivesList(data) {
  return request({
    url: "/api/admin/document/documentList/5",
    method: "post",
    data: data,
  });
}
//添加公司规章制度
export function addDocument(data) {
  return request({
    url: "/api/admin/document/addDocument",
    method: "post",
    data: data,
  });
}
//添加开发文档规范
export function addDocumentseven(data) {
  return request({
    url: "/api/admin/document/addDocument",
    method: "post",
    data: data,
  });
}
//添加项目管理文档
export function addDocumenteight(data) {
  return request({
    url: "/api/admin/document/addDocument",
    method: "post",
    data: data,
  });
}
//添加其他文档
export function addDocumentfives(data) {
  return request({
    url: "/api/admin/document/addDocument",
    method: "post",
    data: data,
  });
}
//修改文档
export function updateDocument(data) {
  return request({
    url: "/api/admin/document/updateDocument",
    method: "put",
    data: data,
  });
}

//删除文档
export function deleteDocument(id, uid) {
  return request({
    url: `/api/admin/document/deleteDocument/${id}/${uid}`,
    method: "delete",
  });
}

//人事管理
//在职-员工信息管理列表
export function selectEmpList(data) {
  return request({
    url: "/api/admin/personnel/selectEmpList",
    method: "post",
    data: data,
  });
}

//员工信息查看详情
export function selectEmpInfoById(id) {
  return request({
    url: `/api/admin/personnel/selectEmpInfoById/${id}`,
    method: "get",
  });
}

//pdf预览
export function getPdf(params) {
  return request({
    url: `api/upload/readFile?fileUrl=${params}`,
    method: "get",
    // params: query,
    responseType: 'blob',
  });
}

//设置员工转正
export function setConversion(data) {
  return request({
    url: "/api/admin/personnel/setConversion",
    method: "post",
    data: data,
  });
}
//添加新员工
export function insertEmp(data) {
  return request({
    url: "/api/admin/personnel/insertEmp",
    method: "post",
    data: data,
  });
}
//编辑员工信息
export function updateEmp(data) {
  return request({
    url: "/api/admin/personnel/updateEmp",
    method: "put",
    data: data,
  });
}
//删除员工账号
export function deleUserAccount(id) {
  return request({
    url: `/api/admin/personnel/deleUserAccount/${id}`,
    method: "delete",
  });
}

//合同管理列表
export function selectContract(data) {
  return request({
    url: "/api/admin/personnel/selectContract",
    method: "post",
    data: data,
  });
}
//查看单人合同信息
export function selectContractByUid(uid) {
  return request({
    url: `/api/admin/personnel/selectContractByUid/${uid}`,
    method: "get",
  });
}
//合同续签
export function insertContractByUid(data) {
  return request({
    url: `/api/admin/personnel/insertContractByUid`,
    method: "post",
    data: data,
  });
}

//离职员工列表
export function selectQuitList(data) {
  return request({
    url: "/api/admin/personnel/selectQuitList",
    method: "post",
    data: data,
  });
}
//办理离职
export function resignation(data) {
  return request({
    url: "/api/admin/personnel/resignation",
    method: "post",
    data: data,
  });
}
//所有在职员工
export function selectAllEmp() {
  return request({
    url: "/api/admin/personnel/selectAllEmp",
    method: "get",
  });
}

//系统设置
//角色权限列表
export function getAuthRoleList() {
  return request({
    url: "/api/admin/auth/getAuthRoleList",
    method: "get",
  });
}
//添加角色
export function addRole(data) {
  return request({
    url: "/api/admin/auth/addRole",
    method: "post",
    data: data,
  });
}
//编辑角色
export function updateRole(data) {
  return request({
    url: "/api/admin/auth/updateRole",
    method: "put",
    data: data,
  });
}
//删除角色
export function deleteRole(id) {
  return request({
    url: `/api/admin/auth/deleteRole/${id}`,
    method: "delete",
  });
}
//权限设置
export function addRoleResource(roleId, data) {
  return request({
    url: `/api/admin/auth/addRoleResource/${roleId}`,
    method: "post",
    data: data,
  });
}
//权限列表
export function getResourceList() {
  return request({
    url: "/api/admin/auth/getResourceList",
    method: "get",
  });
}
//当前角色对应的权限列表
export function getRoleResourceList(roleId) {
  return request({
    url: `/api/admin/auth/getRoleResourceList/${roleId}`,
    method: "get",
  });
}
//当前用户资源列表(一级菜单)
export function getUserAuthResourceListone() {
  return request({
    url: "/api/admin/auth/getUserAuthResourceList",
    method: "get",
  });
}
//获取当前角色资源二级菜单
export function getUserAuthResourceList(resId) {
  return request({
    url: `/api/admin/auth/getUserAuthResourceList/${resId}`,
    method: "get",
  });
}
//获取点击角色二级id（包含以及id）用于权限配置回显
export function getAllSecondAuthResourceList(resId) {
  return request({
    url: `/api/admin/auth/getAllSecondAuthResourceList/${resId}`,
    method: "get",
  });
}

//职能组管理
//职能组成员列表
export function selectGroupUser(fid) {
  return request({
    url: `/api/admin/company/selectGroupUser/${fid}`,
    method: "get",
  });
}
//职能组成员添加
export function insertGroupUser(fid, data) {
  return request({
    url: `/api/admin/company/insertGroupUser/${fid}`,
    method: "post",
    data: data,
  });
}
//职能组组长设置
export function setGroupLeader(data) {
  return request({
    url: `/api/admin/company/setGroupLeader/${data.uid}/${data.islea}`,
    method: "put",
  });
}

//账号管理
//账号管理列表
export function accountManagList(data) {
  return request({
    url: "/api/admin/systemset/accountManagList",
    method: "post",
    data: data,
  });
}
//重置密码
export function resetPassword(id) {
  return request({
    url: `/api/admin/systemset/resetPassword/${id}`,
    method: "put",
  });
}
//是否禁用账户
export function disableUser(id, is) {
  return request({
    url: `/api/admin/systemset/disableUser/${id}/${is}`,
    method: "put",
  });
}
//账号管理之编辑
export function updateAccount(data) {
  return request({
    url: "/api/admin/systemset/updateAccount",
    method: "put",
    data: data,
  });
}

//业绩属性配置
//业绩属性列表
export function attributeList() {
  return request({
    url: "/api/admin/systemset/attributeList",
    method: "get",
  });
}
//添加属性
export function insertAttribute(data) {
  return request({
    url: "/api/admin/systemset/insertAttribute",
    method: "post",
    data: data,
  });
}
//编辑属性
export function updateAttribute(data) {
  return request({
    url: "/api/admin/systemset/updateAttribute",
    method: "put",
    data: data,
  });
}
//根据id查询单个属性
export function selectAttributeById(id) {
  return request({
    url: `/api/admin/systemset/selectAttributeById/${id}`,
    method: "get",
  });
}
//删除属性
export function deleteAttribute(id) {
  return request({
    url: `/api/admin/systemset/deleteAttribute/${id}`,
    method: "delete",
  });
}

//日报管理
//添加日报选择项目下拉列表
export function selectUserProject(data) {
  return request({
    url: "/api/admin/daily/selectUserProject",
    method: "post",
    data,
  });
}
//添加日报-添加计划 根据type 1/2
export function addTask(data) {
  return request({
    url: "/api/admin/daily/addTask",
    method: "post",
    data: data,
  });
}

//确认日报
export function confirm(id) {
  return request({
    url: `/api/admin/daily/confirm/${id}`,
    method: "get",
  });
}

//删除日报
export function deleteTask(id) {
  return request({
    url: `/api/admin/daily/deleteTask/${id}`,
    method: "delete",
  });
}

//修改任务-修改计划 根据type 1/2
export function updateTask(data) {
  return request({
    url: "/api/admin/daily/updateTask",
    method: "put",
    data: data,
  });
}
//历史日报
export function historyTask(data) {
  return request({
    url: "/api/admin/daily/historyTask",
    method: "post",
    data: data,
  });
}

export function unconfirmed(fid) {
  return request({
    url: `/api/admin/daily/unconfirmedTask/${fid}`,
    method: "get",
  });
}

export function selectConversion(uid) {
  return request({
    url: `/api/admin/personnel/selectConversion/${uid}`,
    method: "get",
  });
}

//售前项目/转正记录 条件查询
export function beforeSaleProjectList(data) {
  return request({
    url: "/api/admin/project/beforeSaleProjectList",
    method: "post",
    data,
  });
}
//添加售前项目
export function beforeSaleProjectAdd(data) {
  return request({
    url: "/api/admin/project/beforeSaleProjectAdd",
    method: "post",
    data,
  });
}

//编辑售前项目
export function updateBeforeSalePrj(data) {
  return request({
    url: "/api/admin/project/updateBeforeSalePrj",
    method: "put",
    data,
  });
}

//查询项目记录
// export function selectProjectRecord(data) {
// 	return request({
// 		url: '/api/admin/project/selectProjectRecord',
// 		method: 'post',
// 		data
// 	})
// }

//批量删除售前项目
export function deleteBeforeSale(data) {
  return request({
    url: "/api/admin/project/deleteBeforeSale",
    method: "DELETE",
    data,
  });
}

//设置售前项目转正
export function setPrjFormal(data) {
  return request({
    url: `/api/admin/project/setPrjFormal`,
    method: "put",
    data
  });
}

// //按照id删除项目记录
// export function deleteProjectRecord(recordId) {
// 	return request({
// 		url: `/api/admin/project/deleteProjectRecord/${recordId}`,
// 		method: 'DELETE'
// 	})
// }

//文件类型配置列表
export function allDocTypeList() {
  return request({
    url: "/api/admin/systemset/allDocTypeList",
    method: "get",
  });
}

//添加文档类型
export function addDocType(data) {
  return request({
    url: "/api/admin/systemset/addDocType",
    method: "post",
    data,
  });
}

//删除文档类型
export function deleteDocType(id) {
  return request({
    url: `/api/admin/systemset/deleteDocType/${id}`,
    method: "delete",
  });
}

//编辑文档类型
export function updateDocType(data) {
  return request({
    url: "/api/admin/systemset/updateDocType",
    method: "put",
    data,
  });
}
//修改离职
export function updateResign(data) {
  return request({
    url: "/api/admin/personnel/updateResign",
    method: "put",
    data,
  });
}

//暂停开启项目
export function prjStopOrBegin(pid, status) {
  return request({
    url: `/api/admin/project/prjStopOrBegin/${pid}/${status}`,
    method: "PUT",
  });
}
//是否大屏显示项目
export function showFlag(data) {
  return request({
    url: `/api/admin/project/showLargeScreen`,
    method: "post",
    data: data,
  });
}

//查看单个文档信息
export function selectDocument(id) {
  return request({
    url: `/api/admin/document/selectDocument/${id}`,
    method: "get",
  });
}

//文档置顶
export function stickDoc(id) {
  return request({
    url: `/api/admin/document/stickDoc/${id}`,
    method: "PUT",
  });
}

//获取内部交流类型
export function getExchangeList() {
  return request({
    url: "/api/admin/discuss/moduleList",
    method: "GET",
  });
}

//增加内部交流类型
export function addExchangeType(data) {
  return request({
    url: "/api/admin/discuss/moduleAdd",
    method: "POST",
    data,
  });
}

//删除内部交流类型
export function deleteExchangeType(id) {
  return request({
    url: `/api/admin/discuss/moduleDelete/${id}`,
    method: "DELETE",
  });
}

//修改内部交流类型
export function editExchangeType(data) {
  return request({
    url: "/api/admin/discuss/moduleEdit",
    method: "PUT",
    data,
  });
}

//获取建议反馈
export function getSuggestion(data) {
  return request({
    url: "/api/admin/systemset/adviseList",
    method: "POST",
    data,
  });
}

//添加建议反馈
export function addSuggestion(data) {
  return request({
    url: "/api/admin/systemset/adviseAddOne",
    method: "POST",
    data,
  });
}

//删除建议反馈
export function deleteSuggestion(id) {
  return request({
    url: `/api/admin/systemset/adviseDeleteOne/${id}`,
    method: "DELETE",
  });
}

//是否采纳建议
export function isAcceptSuggestion(id, isAccept) {
  return request({
    url: `/api/admin/systemset/acceptAdviseOne/${id}/${isAccept}`,
    method: "PUT",
  });
}

//获取不同的内部交流模块的文章列表
export function getArticleList(data) {
  return request({
    url: "/api/admin/discuss/articleList",
    method: "POST",
    data,
  });
}

//置顶文章
export function toTopArticle(id) {
  return request({
    url: `/api/admin/discuss/articleTop/${id}`,
    method: "PUT",
  });
}

//发布文章
export function addArticle(data) {
  return request({
    url: "/api/admin/discuss/articleAdd",
    method: "POST",
    data,
  });
}

//文章详情
export function getArticleDetail(id) {
  return request({
    url: `/api/admin/discuss/articleOne/${id}`,
    method: "GET",
  });
}

//修改文章
export function editArticleDetail(data) {
  return request({
    url: "/api/admin/discuss/articleEdit",
    method: "PUT",
    data,
  });
}

//删除文章
export function deleteArticleDetail(id) {
  return request({
    url: `/api/admin/discuss/articleDelete/${id}`,
    method: "DELETE",
  });
}

//给文章点赞或者取消点赞
export function likeArticle(id) {
  return request({
    url: `/api/admin/discuss/articleLike/${id}`,
    method: "PUT",
  });
}

//获取文章一级评论列表
export function getFirstCommentList(data) {
  return request({
    url: "/api/admin/discuss/commLevelOneList",
    method: "POST",
    data,
  });
}

//获取文章二级评论列表
export function getSecondCommentList(data) {
  return request({
    url: "/api/admin/discuss/commLevelTwoList",
    method: "POST",
    data,
  });
}

//添加评论
export function addComment(data) {
  return request({
    url: "/api/admin/discuss/commentAdd",
    method: "POST",
    data,
  });
}

//删除评论
export function deleteComment(id) {
  return request({
    url: `/api/admin/discuss/commentDelete/${id}`,
    method: "DELETE",
  });
}

//推荐/取消推荐文章到首页
export function updateRecommendFlag(data) {
  return request({
    url: `/api/admin/discuss/updateRecommendFlag/${data.id}/${data.flag}`,
    method: "get",
  });
}

//用户参与的进行中的项目
export function userProgressProjects(data) {
  return request({
    url: `/api/admin/daily/userProgressProjects`,
    method: "get",
  });
}

// 2021/3/9新增
// 撤销确认了的日报/计划
export function getcancelConfirm(id) {
  return request({
    url: `/api/admin/daily/cancelConfirm/${id}`,
    method: "get",
  });
}

// 获取【售前项目】需求责任人下拉框列表
export function getRequirementUserDuty() {
  return request({
    url: `/api/admin/version/getRequirementUserDuty`,
    method: "get",
  });
}

// 部门列表
export function getdeptList() {
  return request({
    url: `/api/admin/dept/deptList`,
    method: "get",
  });
}

// 添加部门
export function postaddDept(data) {
  return request({
    url: `/api/admin/dept/addDept`,
    method: "post",
    data
  });
}

// 编辑部门
export function puteditDept(data) {
  return request({
    url: `/api/admin/dept/editDept`,
    method: "put",
    data
  });
}

// 删除部门
export function deletaDeleteDept(id) {
  return request({
    url: `/api/admin/dept/deleteDept/${id}`,
    method: "delete"
  });
}


// 查看项目日报列表
export function postselectDailyByProjectId(data) {
  return request({
    url: `/api/admin/daily/selectDailyByProjectId`,
    method: "post",
    data
  });
}


// 项目工时信息数据导出
export function exportWorkingHours(data) {
  return request({
    url: `/api/admin/project/exportWorkingHours`,
    method: "post",
    responseType: "blob",
    data
  });
}

// 新增部门计划
export function addWeekDepartmentPlan(data) {
  return request({
    url: `/api/admin/weekdepartmentplan/addWeekDepartmentPlan`,
    method: "post",
    data
  });
}

// 查询部门计划
export function weekdepartmentplan(data) {
  return request({
    url: `/api/admin/weekdepartmentplan/list`,
    method: "post",
    data
  });
}

// 修改部门计划内容
export function editWeekDepartmentPlan(data) {
  return request({
    url: `/api/admin/weekdepartmentplan/editWeekDepartmentPlan`,
    method: "put",
    data
  });
}

//删除部门计划
export function deleteWeekDepartmentPlan(id) {
  return request({
    url: `/api/admin/weekdepartmentplan/delete/${id}`,
    method: "delete",
  });
}

//获取下属任务列表
export function executingTask(data) {
  return request({
    url: `/api/admin/taskinfo/executingTask`,
    method: "post",
    data
  });
}